<?php

class AdminEnrollment_Controller extends Admin_Controller {
	public function index(Request $request, Response $response) {
		/**
		 * @var Student $student
		 */
		$students = Student::find(new TrueQuery(), ['nolimit' => 1]);
		$studentsToDelete = [];
		foreach ($students as $student) if ($student->totalCredits(false) >= 24) $studentsToDelete[$student->id] = $student->totalCredits(false);
		$response->append(new View('admin/enrollment', compact('studentsToDelete')));
	}
}